/* 路由器对象模块 */
import Vue from 'vue'
import VueRouter from 'vue-router'

const Index=()=>import('../pages/index/index.vue')
const Kefu=()=>import('../pages/kefu/index.vue')
const Fwz=()=>import('../pages/service/index.vue')
const My=()=>import('../pages/user/index.vue')

import Login from '../pages/Login/Login.vue'
import UserInfo from '../pages/user/userInfo.vue'
import  MyPolify from '../pages/user/my-polify.vue'
import HousingManagement from "../pages/index/housingManagement.vue"
import HouseAdd from "../pages/index/houseAdd.vue"
import List from "../pages/index/list.vue"
// import Shop from '../pages/Shop/Shop.vue'
// import ShopGoods from '../pages/Shop/ShopGoods/ShopGoods.vue'
// import ShopRatings from '../pages/Shop/ShopRatings/ShopRatings.vue'
// import ShopInfo from '../pages/Shop/ShopInfo/ShopInfo.vue'

Vue.use(VueRouter)
const originalPush = VueRouter.prototype.push
   VueRouter.prototype.push = function push(location) {
   return originalPush.call(this, location).catch(err => err)
}
export default new VueRouter({
	//所有路由
	routes:[
		{
			path:'/index',
			component:Index,
			meta:{
				showFooter:true
			}
		},
		{
			path:'/kefu',
			component:Kefu,
			meta:{
				showFooter:true
			}
		},
		{
			path:'/fwz',
			component:Fwz,
			meta:{
				showFooter:true
			}
		},{
			path:'/my',
			component:My,
			meta:{
				showFooter:true
			}
		},
		{
			path:'/',
			redirect:'/index'
			
		},
		{
		  path: '/login',
		  component: Login
		},
		{
		  path: '/userinfo',
		  component: UserInfo
		},
        {
          path: '/my-polify',
          component: MyPolify
        },
        {
         path:'/housingManagement',
         component:HousingManagement
        },
        {
         path:'/houseAdd',
         component:HouseAdd
        },{
            path:'/list',
            component:List
            
        }
		
	]
})